Cuando trato de hacer que Android se compile usando estos comandos, yarn run android OR react-native run-android entonces he mostrado este error. Por favor, ayude a mw a resolver este error.
aquí está paquete.json
"@react-native-firebase/admob": "^11.5.0", "@react-native-firebase/app": "^11.5.0", "@react-native-firebase/messaging": "^11.5.0",error:
> Configure project :react-native-firebase_messaging :react-native-firebase_messaging package.json found at /Users/apple/Desktop/xnd-react-native/node_modules/@react-native-firebase/messaging/package.json :@react-native-firebase_app package.json found at /Users/apple/Desktop/xnd-react-native/node_modules/@react-native-firebase/app/package.json :react-native-firebase_messaging:firebase.bom using default value: 26.8.0 :react-native-firebase_messaging package.json found at /Users/apple/Desktop/xnd-react-native/node_modules/@react-native-firebase/messaging/package.json :react-native-firebase_messaging:version set from package.json: 11.5.0 (11,5,0 - 11005000) :react-native-firebase_messaging:android.compileSdk using custom value: 31 :react-native-firebase_messaging:android.targetSdk using custom value: 31 :react-native-firebase_messaging:android.minSdk using custom value: 21 :react-native-firebase_messaging:reactNativeAndroidDir /Users/apple/Desktop/xnd-react-native/node_modules/react-native/android > Task :@react-native-firebase_messaging:compileDebugJavaWithJavac FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings 17 actionable tasks: 1 executed, 16 up-to-dateTambién tengo el mismo problema en jdk 8. Cuando cambio el jdk 8 a 11, me funciona.
Para actualizar de jdk 8 a 11, consulte https://github.com/invertase/react-native-firebase/issues/1988#issuecomment-1070831039
Actualiza la versión de JDK y pruébalo,
puedes actualizar JDK usando este comando
choco install -y nodejs-lts openjdk11